Những câu hỏi liên quan
Nguyễn Cảnh Hùng
Xem chi tiết
Đỗ Ngọc Trinh
11 tháng 9 2018 lúc 6:05

Đáp án đúng : C

Bình luận (0)
Nguyễn Cảnh Hùng
Xem chi tiết
Đỗ Ngọc Trinh
28 tháng 5 2018 lúc 4:07

Đáp án đúng : B

Bình luận (0)
Nguyễn Cảnh Hùng
Xem chi tiết
Đỗ Ngọc Trinh
23 tháng 10 2018 lúc 9:39

Đáp án đúng : A

Bình luận (0)
Trần Mai Thảo
Xem chi tiết
Minh Lệ
22 tháng 3 2023 lúc 23:40

a/ var s: string;

b/ readln(s);

c/ write(length(s));

d/ for i:=1 to length(s) do if s[i] in ['0'..'9'] then write(s[i]);

Bình luận (0)
WeSe Trung
Xem chi tiết
Nguyễn Ngọc Quỳnh Trang
Xem chi tiết
Trần Hải Đăng
Xem chi tiết
Nguyễn Lê Phước Thịnh
12 tháng 1 2022 lúc 22:16

uses crt;

var kt:boolean;

st:string;

i,d:integer;

begin

clrscr;

readln(st);

d:=length(st);

kt:=true;

for i:=1 to d do 

  if st[i]<>st[d-i+1] then kt:=false;

if kt=true then writeln('Day la xau doi xung')

else writeln('Day khong la xau doi xung');

readln;

end.

Bình luận (0)
Đỗ Trần Nam Phương
Xem chi tiết
Long ca ca
Xem chi tiết
Minh Lệ
26 tháng 6 2023 lúc 19:38

Program HOC24;
var s: string;
a: array[1..255] of string;
max,d,i: byte;
begin
write('Nhap xau: '); readln(s);
while s[1]=#32 do delete(s,1,1);
while s[length(s)]=#32 do delete(s,length(s),1);
while pos(#32#32,s)<>0 do delete(s,pos(#32#32,s),1);
s:=s+' '
while length(s)<>0 do
begin
d:=d+1;
a[d]:=copy(s,1,pos(#32,s));
delete(s,1,pos(#32,s));
end;
max:=length(a[1]);
for i:=2 to d do
if max<length(a[i]) then max:=length(a[i]);
for i:=1 to d do
if max = length(a[i]) then writeln(a[i]);
readln
end.

Bình luận (0)
Nguyễn Hoàng Duy
27 tháng 6 2023 lúc 9:58

Program HOC24;
uses sysutils;

var s: string;
  words: TStringDynArray;
  max_length, i: integer;
  longest_words: array of string;

begin
  write('Nhap xau: ');
  readln(s);
  words := SplitString(s);
  max_length := 0;
  for i := Low(words) to High(words) do
    if Length(words[i]) > max_length then
      max_length := Length(words[i]);
  SetLength(longest_words, 0);
  for i := Low(words) to High(words) do
    if Length(words[i]) = max_length then
    begin
      SetLength(longest_words, Length(longest_words) + 1);
      longest_words[High(longest_words)] := words[i];
    end;
  writeln('Tu dai nhat trong xau là:');
  for i := Low(longest_words) to High(longest_words) do
    writeln(longest_words[i]);
end.

Bình luận (0)